local t = Def.ActorFrame{};

if not GAMESTATE:IsCourseMode() then return t; end;

t[#t+1] = LoadActor( THEME:GetPathG("_bg","transition")) .. {
			InitCommand=cmd(Center);
			StartCommand=cmd(diffusealpha,0;smooth,0.4;diffusealpha,1;);
			FinishCommand=cmd(smooth,0.5;diffusealpha,0;);
		};			


t[#t+1] = Def.Sprite {
	name="SongJacket";
	InitCommand=cmd(diffusealpha,1.0;);
	StartCommand=cmd(Center;zoomy,0;diffusealpha,0;decelerate,0.5;diffusealpha,1;zoomy,1);
	FinishCommand=cmd(smooth,0.5;diffusealpha,0;zoomy,0.5);
	BeforeLoadingNextCourseSongMessageCommand=function(self) 
            local song = SCREENMAN:GetTopScreen():GetNextCourseSong(); 
			if song then
                if song:HasJacket() then
                    self:Load(song:GetJacketPath()):scaletoclipped(256,256)
                elseif song:HasBanner() then
                    self:Load(song:GetBannerPath()):scaletoclipped(256,80)
                else
                    self:Load(THEME:GetPathG("Common fallback", "banner")):scaletoclipped(256,256)
                end
			else
				self:diffusealpha(0)
            end
			end;
};

return t;